Variable handling Functions
PHP Manual

is_unicode

(PHP 6 >= 6.0.0)

is_unicodeFinds whether a variable is a unicode string

Descripción

bool is_unicode ( mixed $var )

Finds whether the given variable is a unicode string.

Lista de parámetros

var

The variable being evaluated.

Valores retornados

Returns TRUE if var is a unicode string, FALSE otherwise.

Ejemplos

Example #1 is_unicode() example

<?php
// Declare a unicode string
$unicode 'This is a unicode string';

// Declare a binary string
$binary b'This is a binary string';

var_dump(is_unicode($unicode), is_unicode($binary));
?>

El resultado del ejemplo seria:

bool(true)
bool(false)

Ver también


Variable handling Functions
PHP Manual